package cn.bocweb.spinning.view.forun;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;

import butterknife.Bind;
import butterknife.ButterKnife;
import cn.bocweb.spinning.R;

public class BBSActivity extends AppCompatActivity {

    ForunMainFragment forunMainFragment;

    @Bind(R.id.bbs_fragment)
    FrameLayout bbsFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bbs);
        ButterKnife.bind(this);

        forunMainFragment = new ForunMainFragment();


        if (forunMainFragment.isAdded()) {
            getSupportFragmentManager().beginTransaction().show(forunMainFragment).commitAllowingStateLoss();
        } else {
            getSupportFragmentManager().beginTransaction().add(R.id.bbs_fragment, forunMainFragment).commitAllowingStateLoss();
        }
    }
}
